package com.hibase.core.lock.compoent;

import com.hibase.core.lock.exception.LockFailureException;
import lombok.extern.slf4j.Slf4j;

import java.lang.reflect.Method;

/**
 * @author chenfeng
 * @version 1.0
 * @date 2021/10/22 11:17
 * @des https://gitee.com/cheershi
 */
@Slf4j
public class DefaultLockFailureStrategy implements LockFailureStrategy{

    protected static String DEFAULT_MESSAGE = "request failed,please retry it.";

    @Override
    public void onLockFailure(String key, Method method, Object[] arguments) {
        throw new LockFailureException(DEFAULT_MESSAGE);
    }
}
